<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:ui="http://java.sun.com/jsf/facelets">
    <nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
        <div class="container-fluid">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                        aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">展开/关闭</span>
                    <span class="icon-bar"/>
                    <span class="icon-bar"/>
                    <span class="icon-bar"/>
                </button>
                <h:link outcome="/index" value="JBlog" styleClass="navbar-brand"/>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <h:form>
                    <ul class="nav navbar-nav navbar-right">
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle"
                               data-toggle="dropdown">欢迎您, #{userBean.currentUser.username}
                                <span class="caret"/></a>
                            <ul class="dropdown-menu" role="menu">
                                <li><h:link outcome="profile" value="个人中心"/></li>
                                <li class="divider"/>
                                <li><h:link outcome="like" value="文章收藏"/></li>
                                <li><h:link outcome="like" value="照片收藏"/></li>
                            </ul>
                        </li>
                        <li><h:commandLink action="#{userBean.logout}" value="退出"/></li>
                    </ul>
                </h:form>
            </div>
        </div>
    </nav>
</ui:composition>
